package com.lmx.project.service;


import cn.hutool.extra.mail.MailUtil;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class FileTes {



    @Test
    public void  test(){
        String url="http://image.tsjsjxxc.top/compitionteam/users/6d0d2cc4714a4b068f0ede3931f8ac32.jpg";

//        String substring = url.substring(url.lastIndexOf("/"), url.length());
        String[] split = url.split("/");

        System.out.println(split[split.length-2]+"/"+split[split.length-1]);
    }

    @Test
    public void  email(){
        String send = MailUtil.send("2943713364@qq.com", "测试", "邮件来自Hutool测试", false);
        System.out.println(send);
    }
}
